<template>
	<view class="content">
		<view class="header">
			<view :style="{height: systemBarHeight + 'px'}">
			</view>
			<view class="navbar">
				<image src="/static/xy/fh.png" mode="" @click="fh()"></image>
				<text>我的课时</text>
			</view>
		</view>

		<view class="tabs">
			<view :class="tabsvalue=='科目二'?'tabs_item1':'tabs_item'" class="tabs_item" @click="kmchange(1)">
				<text>科目二</text>
			</view>

			<view :class="tabsvalue=='科目三'?'tabs_item3':'tabs_item2'" class="tabs_item2" @click="kmchange(2)">
				<text>科目三</text>
			</view>
		</view>

		<view class="list">
			<view class="list_item">
				<view class="date">
					<image src="/static/xy/shijian.png" mode=""></image>
					<text>2025-01-01 10:00 至 2025-01-01 10:00</text>
				</view>
				<view class="jia_date">
					<text>+2h</text>
				</view>
			</view>

			<view class="list_item">
				<view class="date">
					<image src="/static/xy/shijian.png" mode=""></image>
					<text>2025-01-01 10:00 至 2025-01-01 10:00</text>
				</view>
				<view class="jia_date">
					<text>+2h</text>
				</view>
			</view>
			<view class="list_item">
				<view class="date">
					<image src="/static/xy/shijian.png" mode=""></image>
					<text>2025-01-01 10:00 至 2025-01-01 10:00</text>
				</view>
				<view class="jia_date">
					<text>+2h</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

				systemBarHeight: 0,
				tabsvalue: '科目二',

			}
		},
		mounted() {
			/* 手机顶部高度 */
			this.getSysteminfo()
		},
		methods: {
			/* 手机顶部高度 */
			getSysteminfo() {
				uni.getSystemInfo({
					success: res => {
						this.systemBarHeight = res.statusBarHeight;
					}
				});
			},
			switchtab(index) {
				this.tabsvalue = index
			},
			fh() {
				uni.navigateBack({
					delta: 1
				})
			},
			kmchange(i) {
				if (i == 1) {
					this.tabsvalue = '科目二'
				}
				if (i == 2) {
					this.tabsvalue = '科目三'
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 750rpx;
		height: 1624rpx;
		background: #F5F5F5;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.header {
		background: #FFFFFF;
	}

	.navbar {
		height: 88rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;

		>image {
			width: 48rpx;
			height: 48rpx;
			position: absolute;
			left: 32rpx;
		}

		>text {

			font-family: PingFang SC, PingFang SC;
			font-weight: 600;
			font-size: 34rpx;
			color: #43484D;

		}
	}

	.tabs {
		width: 93%;
		margin: 24rpx auto 0;
		height: 84rpx;
		display: flex;


		.tabs_item {
			width: 50%;
			background: #F4FFFB;
			display: flex;
			align-items: center;
			justify-content: center;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 34rpx;
			color: #43484D;
			border-radius: 30rpx 0rpx 0rpx 0rpx;
		}

		.tabs_item1 {
			width: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			background: linear-gradient(180deg, #84FFD0 0%, #FFFFFF 100%);
			box-shadow: 0rpx -4rpx 16rpx 0rpx #D4F2E6;
			border-radius: 30rpx 0rpx 0rpx 0rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 34rpx;
			color: #207554;

		}

		.tabs_item2 {
			width: 50%;
			background: #F4FFFB;
			display: flex;
			align-items: center;
			justify-content: center;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 34rpx;
			color: #43484D;
			border-radius: 0rpx 30rpx 0rpx 0rpx;
		}

		.tabs_item3 {
			width: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			background: linear-gradient(180deg, #84FFD0 0%, #FFFFFF 100%);
			box-shadow: 0rpx -4rpx 16rpx 0rpx #D4F2E6;
			border-radius: 0rpx 30rpx 0rpx 0rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 34rpx;
			color: #207554;
		}


	}

	.list {
		width: 93%;
		margin: auto;

		background: #FFFFFF;
		border-radius: 0rpx 0rpx 24rpx 24rpx;
		padding-top: 40rpx;
		padding-bottom: 40rpx;

		.list_item {
			width: 90%;
			height: 144rpx;
			margin: 0 auto 32rpx;
			background: #FAFAFA;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			margin-bottom: 32rpx;

			.date {



				display: flex;
				align-items: center;
				padding-top: 24rpx;
				margin: auto;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #43484D;

				>image {
					width: 32rpx;
					height: 32rpx;
					margin-left: auto;

				}

				>text {
					margin-left: 16rpx;
					margin-right: 32rpx;
				}

			}

			.jia_date {


				margin: 16rpx auto 0;
				display: flex;
				justify-content: space-between;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #27C73C;

				>text {
					margin-left: auto;
					margin-right: 32rpx;
				}

			}
		}
	}
</style>